Skip to content

Add handler for flags #6597

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 28, 2025
Merged

Conversation

akatsoulas
Copy link
Collaborator

No description provided.

@akatsoulas akatsoulas requested a review from smithellis March 28, 2025 11:04
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a handler to clean up flags associated with a user when that user is deleted.

  • Registers FlagListener in the user deletion pipeline.
  • Implements FlagListener to remove flags where the deleted user is the content object.
  • Adds tests to verify that the proper flags are removed while flags created by the user remain.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
kitsune/users/utils.py Registers FlagListener in the user deletion pipeline.
kitsune/flagit/tests/test_handlers.py Adds tests verifying flag deletion behavior on user deletion.
kitsune/flagit/handlers.py Implements FlagListener for cleaning up related flagged items.

@escattone escattone merged commit 1b08b5d into mozilla:main Mar 28, 2025
2 checks passed
@akatsoulas akatsoulas deleted the flagged-objs-deletion branch March 31, 2025 10:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants